package com.dsh.payMethod.controller;

import com.dsh.model.Result;
import com.dsh.payMethod.entity.ChargeEntity;
import com.dsh.payMethod.entity.PayMethodVo;
import com.dsh.payMethod.service.ChargeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "收费设置")
@RestController
@RequestMapping("charge")
public class ChargeAndPayController {





    @Resource
    ChargeService chargeService;
    @ApiOperation(value = "收费处理",response = ChargeEntity.class)
    @GetMapping("selectCharge")
    public Result selectCharge(){
        ChargeEntity chargeEntity = chargeService.selectCharge();
        return Result.success(chargeEntity,"");
    }
    @ApiOperation(value = "支付方式",response =PayMethodVo.class )
    @GetMapping("selectPay")
    public Result selectPay(){
        List<PayMethodVo> payMethodVos = chargeService.selectPay();
        return Result.success(payMethodVos,"");
    }
}
